﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Database;
public partial class admin_Hienthitintuc : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var pm = new checkLogin();
        pm.redirectToLoginPage();
    }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
         if (Convert.ToString(e.CommandArgument) == "dk")
            {
                TinTuc tt=new TinTuc();
                int matintuc = Convert.ToInt32(((HyperLink)e.Item.FindControl("hplMaTT")).Text);
                //nv.XoaNV(manv);
                tt.XoaTT(matintuc);
                LayDuLieu();
             Response.Redirect("Hienthitintuc.aspx");
    }

         else
         {
             LayDuLieu();
         }

    }



          public void LayDuLieu()
        {


            PagedDataSource pgitems = new PagedDataSource();
            DataView dv = new DataView(TinTuc.DSTT().Tables[0]);

          }

}
